package org.budo.graph.entity;

import com.google.common.cache.Cache;

/**
 * @author lmw
 */
public class GuavaCacheStatistics extends EhcacheStatistics {
    private static final long serialVersionUID = -6972634945695745722L;

    private String name;

    private Cache cache;

    public GuavaCacheStatistics(String name, Cache cache) {
        this.name = name;
        this.cache = cache;
    }

    @Override
    public String getCacheName() {
        return this.name;
    }

    @Override
    public Long getLocalDiskHitCount() {
        return 0L;
    }

    @Override
    public Long getLocalHeapHitCount() {
        return this.cache.stats().hitCount();
    }

    @Override
    public Long getCacheHitCount() {
        return this.cache.stats().hitCount();
    }

    @Override
    public Long getCacheMissCount() {
        return this.cache.stats().missCount();
    }

    @Override
    public Long getCacheMissExpiredCount() {
        return 0L;
    }

    @Override
    public Double getMissExpiredRatio() {
        return 0D;
    }

    @Override
    public Long getCacheMissNotFoundCount() {
        return this.cache.stats().missCount();
    }

    @Override
    public Double getMissNotFoundRatio() {
        return this.cache.stats().missRate();
    }

    @Override
    public Long getCachePutCount() {
        return this.cache.stats().loadCount();
    }

    @Override
    public Long getCachePutAddedCount() {
        return 0L;
    }

    @Override
    public Long getCacheRemoveCount() {
        return 0L;
    }

    @Override
    public Long getCacheEvictedCount() {
        return 0L;
    }

    @Override
    public Long getCacheExpiredCount() {
        return 0L;
    }

    @Override
    public Long getTimeToLiveSeconds() {
        return 0L;
    }

    @Override
    public Long getTimeToIdleSeconds() {
        return 0L;
    }

    @Override
    public Long getMaxEntriesLocalDisk() {
        return 0L;
    }

    @Override
    public Long getMaxEntriesLocalHeap() {
        return 0L;
    }

    @Override
    public Integer getKeyCount() {
        return 0;
    }
}